# 导包
from time import sleep
from selenium import webdriver

# 实例化浏览器
driver = webdriver.Chrome()

# 打开网址
driver.get('https://www.baidu.com/')

# 需求
ele = driver.find_element_by_css_selector('#kw')
ele.send_keys('易烊千玺')
sleep(2)

# 清空
ele.clear()
ele.send_keys('王嘉尔')

# 时间轴看效果
sleep(3)

# 关闭页面
driver.quit()
